function sendRequest() {
  const input = document.querySelector('[type="file"]')
  if (input.files.length === 0) return

  const formData = new FormData()
  formData.append('file', input.files[0])

  fetch('http://127.0.0.1/api/post/uploadFile', {
    method: 'POST',
    body: formData
  })
    .then(res => res.text())
    .then(data => {
      console.log(data)
    })
    .catch(err => {
      console.log(err)
    })
}
